<?php

namespace wxopen;


use Think\Cache;
use Think\Db;

if (!class_exists("WXBizMsgCrypt")) {
    include_once "3rd/aes/wxBizMsgCrypt.php";
}
/**
 * 微信第三方平台SDK
 */
class Wxde
{

	public function __construct()
    {
       
    }

   
    public function decrypt()
    {	

		
		$encodingAesKey = "PrDDp1zBMDRTRDxpZRq1roQpZPivRRXpPrDDp1zBMDR";
		$token = "n4lhFm9Cn8GlKFtPD4KmTfTzB3YlLXqV";
		$appId = "wx24f02939032a8db0";
		$msg_signature= "f3075d48fe5d1b08aa932bdb539524250adb1bfe";
		$timestamp = "1616420801";
		$nonce= "147526646";
		$postStr = "<xml>
    <AppId><![CDATA[wx24f02939032a8db0]]></AppId>
    <Encrypt><![CDATA[teJOSXaSoZAeOWGAEMEaleWjlKpCDjOXSCF7aAOCXMWu0Kn5nUG3cdU++K67eANxDaBmc25Ey9nArxkzQgJZcqxNo+eS2L6sMt2V54PqZ4nkG9FIzkRNRUUyX1zjGJv8aJM1/rUmyehK6j+/vVI/Ay/4/SuSDRg0xa1sObVGDNyNk3DUis3DV+3RBjgxkdRvGG31gxdbtu0CKf6/l4YaZC7UWPK3mDyJniMpzlqrA+t6ggswBG1+PfjRMMAdFxR+8HjqxE05ofnAxQEOL9vNQ3EawBzAJqEEUb9Ctb8vFKSzhXNyGMKKEKJNk6fzCGKY2J290LMQQnmS/IKE3KIF7vgfbYWp7ft6rFrFWvG3qE3zVJ9XrDYkKzG27ZBUL9kBq6jzleKFoV0hI1AaJ8YBMxsG3c9229B715y+dZLWualadC7JsHD6Fl+tOknxGpmtU3gb5ggjZRi4S01zv7/dZw==]]></Encrypt>
</xml>";
		$dec_msg="";
        $pc = new \WXBizMsgCrypt($token, $encodingAesKey, $appId);
		$ret = $pc->decryptMsg($msg_signature, $timestamp, $nonce, $postStr, $dec_msg);
		var_dump($ret);
		
    }


}